import {INCREMENT, SUBTRACTION} from '../action_types.js'

export const createIncrementAction = value => ({type:INCREMENT, data:value*1})

export const createSubtractionAction = value => ({type:SUBTRACTION, data:value*1})

export const createIncrementAsyncAction = (value,delay) => {
  return (dispatch) => {
    setTimeout(() => {
      dispatch(createIncrementAction(value))
    },delay)
  }
}
